import {createApp} from 'vue'
import App from './App.vue'


import ElementPlus from 'element-plus';
import 'element-plus/lib/theme-chalk/index.css'
// @ts-ignore
import VMdEditor from '@kangc/v-md-editor';
import '@kangc/v-md-editor/lib/style/base-editor.css';
// @ts-ignore
import vuepressTheme from '@kangc/v-md-editor/lib/theme/vuepress.js';
import '@kangc/v-md-editor/lib/theme/style/vuepress.css';
//@ts-ignore
import GlobalComponent from './components/index.js';
//@ts-ignore
import toast from './plugins/toast.js';
//@ts-ignore
import focus from './directive/focus';
//@ts-ignore
import permision from './directive/permision';
//@ts-ignore
import store from './store/index.js';


// Prism
// @ts-ignore
import Prism from 'prismjs';
// highlight code
import 'prismjs/components/prism-json';

let {inputUpload} = GlobalComponent

VMdEditor.use(vuepressTheme, {
  Prism,
});


// import Element from './plugins/element';

let app = createApp(App);

// console.log(Element);

// app.use(ElButton);
// app.use(ElSelect);
// app.use(ElOption);
app.use(ElementPlus);
app.use(toast);

app.directive('focus',focus);
app.directive('permision', permision);
app.component('input_upload', inputUpload);

app.use(store);
// Object.keys(Element).forEach(Ele => app.use(Element[Ele]));

app.use(VMdEditor);

app.mount('#app');
